package com.longy.gulimall.product.mq;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.longy.gulimall.product.controller.Amtresp;
import com.longy.gulimall.product.controller.AmtrespLi;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

@Component
public class SmsListener {
    @JmsListener(destination = "dev_queue")
    public void receiveMessage(String message) {
        // 处理接收到的消息，可以根据实际需求进行业务处理
        System.out.println("dev_queueReceived message: " + message);
    }
    @JmsListener(destination = "test.queue")
    public void receiveTestMessage(String message) {
        // 处理接收到的消息，可以根据实际需求进行业务处理
        System.out.println("test.queueReceived message: " + message);
    }
    @JmsListener(destination = "test2.queue")
    public void receiveTest2Message(String message) {
        // 处理接收到的消息，可以根据实际需求进行业务处理
        System.out.println("test2.queueReceived message: " + message.toString());
    }

    @JmsListener(destination = "topicQueue", containerFactory = "topicListener", subscription = "lmcDurableSubscription")
    public void receiveTopic1Message(String amtresp) {
        Amtresp amtresp1 = JSONUtil.toBean(new JSONObject(amtresp), Amtresp.class);
        // 处理接收到的消息，可以根据实际需求进行业务处理
        System.out.println("topicQueueReceived111 message: " + amtresp1.toString());
    }
//    @JmsListener(destination = "topicQueue",containerFactory = "topicListener")
//    public void receiveTopic2Message(String amtresp) {
//        // 处理接收到的消息，可以根据实际需求进行业务处理
//        System.out.println("topicQueueReceived222 message: " + amtresp.toString());
//    }
//    @JmsListener(destination = "topicQueue",containerFactory = "topicListener")
//    public void receiveTopic3Message(Amtresp amtresp) {
//        // 处理接收到的消息，可以根据实际需求进行业务处理
//        System.out.println("topicQueueReceived333 message: " + amtresp.toString());
//    }

public static void main(String[] args) {
    List<Integer> integers1 = Arrays.asList(119, 120, 121);
    List<Integer> integers2 = Arrays.asList(1234, 123, 111);

    System.out.println(integers2.stream().noneMatch(integers1::contains));
}
}
